package com.cjx.demo2.controller;

import com.cjx.common.api.CommonResult;
import com.cjx.demo2.api.Demo2Service;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
*@Description demo2Controller
*@Verson v1.0.0
*@Author cjunxian
*@Date
*/
@Api(tags = "demo2服务接口", value = "Demo2Controller")
@RestController
@RequestMapping("/demo2")
public class Demo2Controller {

    @Autowired
    Demo2Service demo2Service;

    /**
     * feign获取demo1
     * @return
     */
    @ApiOperation(value = "测试feign调用demo1")
    @GetMapping("/getDemo1Config")
    public CommonResult getDemo1Config(){
        return demo2Service.feignFromDemo1();
    }
}
